home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d20 / cpml_110.arc / COPYMAIL.DOC < prev    next >
Text File  |  1991-03-03  |  13KB  |  258 lines

  1. CopyMail Version 1.10 -- Copyright 1990 by W. F. Muldrow
  2.  
  3.     This program is an original work by W. F. Muldrow (8:928/1@RBBSNet or
  4. 1:3617/1@FidoNet).  Permission is granted to freely distribute unmodified
  5. copies of this program together with its documentation and sample
  6. configuration files so long as no fee is charged for such distribution.
  7. Permission is also granted to use the original program or a modified version
  8. of this program and to incorporate any or all of this program into other
  9. applications so long as no fee is charged for any derivative work.
  10.  
  11.     COPYMAIL is intended for use in multitasking, multi-node, or multi-
  12. domain unattended mailer applications.  It provides the capability of moving
  13. outbound mail packets and bundles which were created in an off-line directory
  14. to the on-line outbound area in a controlled and safe manner.  Multiple nodes
  15. are supported.  Multiple off-line outbound areas are supported in order to
  16. facilitate multi-zone applications.  For multi-domain use, it can easily
  17. support Binkley-Term's outbound directory naming conventions, because you
  18. explicitly name the directories that CopyMail should copy to and from.
  19.  
  20.     Copymail uses the Binkley-Term version 2.40 convention of looking for
  21. and creating a flag file (xxxxyyyy.BSY) in the outbound directory to indicate
  22. when it is unsafe to alter outbound files for a node.  To enable this feature
  23. in Binkley-Term, the TaskNumber and Flags configuration verbs should be
  24. enabled.  Copymail will also create task flags in Binkley's Flags directory
  25. to help in coordinating multitasking operations.  The way these flags work
  26. is this:
  27.  
  28.         The "flag" file is located in the Binkley-Term (or Opus) outbound
  29. files directory.  It has a file name of "xxxxyyyy.BSY" where "xxxx" and
  30. "yyyy" are the net/node number in hexadecimal notation.  Binkley-Term will
  31. create this flag just before attempting to dial the node or if the connection
  32. is an inbound call, just before sending files.  If the flag already exists,
  33. then some other process (or node) is using those files, and Bink will leave
  34. them alone.  CopyMail creates the flag just before copying mail for that
  35. node into the outbound directory, and will skip that node's mail if the flag
  36. already exists.  The busy flag is all that is required for CopyMail and
  37. Binkley-Term to correctly hand-shake with each other.  CopyMail creates the
  38. flag files in both the "to" and "from" directories, so it can be used to
  39. copy mail both to and from the "live" Binkley outbound directories.
  40.  
  41.         The "task" flag is named "TASK.xx" where xx is the task number in
  42. hexadecimal.  All the task flags reside in the "flags" directory, and are
  43. used to show that the task is active.  Binkley-Term creates its task flag
  44. any time it is "connected" to another modem.  The task flag is deleted when
  45. Bink drops through to the BBS or disconnects the line.  CopyMail creates
  46. the task flag at the end of its initialization and deletes it when it
  47. finishes executing.  CopyMail will NOT run if its task flag already exists,
  48. so you can prevent it from copying mail by creating the appropriate task
  49. flag from somewhere else.  Although Binkley-Term maintains its task flag,
  50. the only program that I am aware of that USES the task flag is a system
  51. monitor that displays the currently active task flags on the screen.
  52.  
  53.     There are several goals to meet in order to efficiently move mail in
  54. a multitasking and/or multinode environment:
  55.  
  56.         1.  All mailer nodes should be online and ready to answer inbound
  57. calls a maximum amount of time.
  58.  
  59.         2.  All mailer nodes should be able to share common outbound areas
  60. so that callers may receive all available mail by calling any available node.
  61.  
  62.         3.  The mailer must not transmit files which are in use by a mail
  63. processor and the mail processor must not compress packets or update bundles
  64. that the mailer is attempting to send.
  65.  
  66.     CopyMail to the rescue!  All of these goals can be satisfied using
  67. CopyMail together with Binkley-Term 2.40 or later.  It is expected that a
  68. future release of Opus will also allow the same processing method to work.
  69. Here's how it's done:
  70.  
  71.         1.  For multi-node systems, all mailer nodes are configured to share
  72. the same set of outbound directories and each node has a unique (not shared)
  73. inbound files directory.
  74.  
  75.         2.  The mail processor is configured to use a different set of
  76. inbound and outbound directories that are not shared with the mailer(s).
  77.  
  78.         3.  When mail is received by the mailer, it is copied from that
  79. node's inbound files area to the mailer's inbound file area.
  80.  
  81.         4.  If the mail processor is not already active, it is started.
  82. When running under a multitasking environment such as Desqview or Windows,
  83. this involves opening an additional window to allow background processing
  84. of the mail.  In a network environment it may involve a mailer node remaining
  85. off line in order to process mail, but even so, only one node need be off
  86. line to process all of the mail that has been received on any node.
  87.  
  88.         5.  When the mail processor is finished and new outbound mail has
  89. been packed up for the mailer to send, the mail processor's batch file
  90. invokes CopyMail.  CopyMail will happily and safely move the new outbound
  91. mail into the mailer's outbound directory(ies).
  92.  
  93.         6.  After CopyMail has done it's thing, the mail processor's batch
  94. file should check to see if more unprocessed mail has been received.  If
  95. so, return to step 4 and process more mail.  Otherwise, if in a window, the
  96. window can be closed; or if in a network, the node can go back on line.
  97.  
  98.         When copying or combining outbound mail files, the flavor of the
  99. outbound file will be the higher priority of the file being copied and any
  100. existing outbound file for the same node address.  The priorities are (from
  101. highest to lowest) Crash, Direct, Normal, and Hold.  As an example, if a
  102. *.DLO file is copied to a directory which already contains an *.FLO, then
  103. the existing *.FLO will be renamed to *.DLO and the new file appended to it.
  104. If the source was an *.HUT and an *.DUT already existed, then the *.HUT
  105. would be appended to the existing *.DUT so that the resulting flavor was
  106. Direct.  This applies only to *.?UT and *.?LO files.  The table below shows
  107. the "flavor" of the resulting mail files:
  108.  
  109.       +----------+------------------------------------------+
  110.       |          |              Existing Mail               |
  111.       |   New    +---------+----------+----------+----------+
  112.       |   Mail   |  Crash  |  Direct  |  Normal  |  Hold    |
  113.       +----------+---------+----------+----------+----------+
  114.       |  Crash   |  Crash  |  Crash   |  Crash   |  Crash   |
  115.       |  Direct  |  Crash  |  Direct  |  Direct  |  Direct  |
  116.       |  Normal  |  Crash  |  Direct  |  Normal  |  Normal  |
  117.       |  Hold    |  Crash  |  Direct  |  Normal  |  Hold    |
  118.       +----------+---------+----------+----------+----------+
  119.  
  120.         Outbound compressed mail files will be created using the current
  121. day of the week in the file extension.  Old outbound mail bundles which
  122. have been truncated to zero length will be deleted.  Since the compressed
  123. mail bundles are always created with the current day in the file extension,
  124. you can gather several old bundles that were created over a several day
  125. period into a single bundle just by copying them out to a separate directory
  126. and then copying them back to the original one.  This comes in handy if you
  127. are feeding nodes that don't pick up mail often.
  128.  
  129.     The files you should have received in this package are:
  130.  
  131.         COPYMAIL.DOC -- This file.
  132.         COPYMAIL.EXE -- Executable program for 8088, 8086, 80186.
  133.         COPYMAIL.286 -- Executable program for 80286, 80386.
  134.         COPYMAIL.CFG -- Sample configuration file.
  135.         COPYMAIL.TXT -- The archive directory with file sizes and checksums.
  136.  
  137.     To run CopyMail, first edit the sample configuration file (you'll find
  138. additional documentation in the sample).  The default configuration file name
  139. is COPYMAIL.CFG.  CopyMail expects to find this file in the current directory
  140. when it is executed (unless you tell it where to find it on the command line).
  141. If you have a PC or XT type computer, run the COPYMAIL.EXE file.  If you
  142. have an AT or 386, you'll probably want to delete COPYMAIL.EXE and rename
  143. COPYMAIL.286 to COPYMAIL.EXE and use it instead.  When running CopyMail, the
  144. following command line should be used:
  145.  
  146.     COPYMAIL [flags] [config-file-name]
  147.  
  148.     The optional flags on the line above may be any of:
  149.  
  150.         /W   -- To override the config file specification and operate in WAIT
  151.                 mode (see the discussion of WAIT and NOWAIT in the config
  152.                 file documentation).
  153.         /N   -- To operate in NOWAIT mode.
  154.  
  155.         /S   -- To open files in DOS's "deny none" file sharing mode.
  156.         /C   -- To open files in DOS's "compatibility" mode.  If using
  157.                 COMPATIBLE mode in the config file, it may also be
  158.                 necessary to use this command line flag if you also
  159.                 specify a config file name on the command line.  (The config
  160.                 file documentation contains more information.)
  161.  
  162.         /O   -- To force the NoOut mode (don't move *.OUT files).
  163.  
  164.         /Tnn -- To override the config file Task number.  nn is a decimal
  165.                 number between 0 and 255.
  166.  
  167.     The optional config-file-name may provide a complete pathname to be used
  168. for the CopyMail configuration file.  This will override the default name of
  169. COPYMAIL.CFG.
  170.  
  171.     All command line and configuration file options may be provided in either
  172. upper or lower case.  Pathnames may use either forward or backward slashes to
  173. divide directory names.  Flags may be preceded by either a forward slash or a
  174. hyphen, and may appear either before or after the configuration file name.
  175.  
  176.     Below, are listed some sample batch file segments which illustrate how
  177. to use CopyMail in a Desqview environment.  DVCOMAND is used to open an
  178. additional Desqview window to process inbound mail.  (By the way, CopyMail
  179. has been tested on several different multitaskers and in several LAN
  180. environments, and performs solidly on all that we've tested.  It's
  181. coincidence that the sample below is for Desqview.)  The batch files below
  182. create and test for "dummy" files that are used as signals between different
  183. processes.  The same signaling method shown here will also work in a LAN
  184. environment or with other multitasking software.  Desqview enthusiasts may
  185. prefer using "named" mail boxes, which is also a good approach.
  186.  
  187. Binkley.Bat:       (mail tossing segment for node 1)
  188.  
  189.     :Toss
  190.     Remark -- If no mail was received, go back online
  191.     if not exist c:\Bink\Node1\*.* Goto Start
  192.  
  193.     Remark -- Now copy all of the new stuff to the mail processor
  194.     copy c:\Bink\Node1\*.* c:\Mail\Files
  195.     del  c:\Bink\Node1\*.*
  196.  
  197.     Remark -- Set a flag to show that new mail has arrived
  198.     echo . >c:\Mail\FlagFile.New
  199.  
  200.     Remark -- If the mail processor is already running, we're done
  201.     if exist c:\Mail\FlagFile.Bsy Goto Start
  202.  
  203.     Remark -- Otherwise, set the "Active" flag and start the processor
  204.     echo . >c:\Mail\FlagFile.Bsy
  205.     dvcomand open c:\dv\mt-pif.dvp
  206.     goto Start
  207.  
  208. The file MT-PIF.DVP used above is the Desqview program information file that
  209. is used to start the mail batch file shown below.
  210.  
  211. Mail.Bat
  212.  
  213.     :Start
  214.     c:
  215.     cd \Mail
  216.     Remark -- Kill the "New Mail" flag
  217.     del c:\Mail\FlagFile.New
  218.  
  219.     Remark -- Use QMail to process all of the new mail.
  220.     QM Toss Scan Pack
  221.  
  222.     Remark -- Use CopyMail to give the mail to the mailer's outbound
  223.     CopyMail
  224.  
  225.     Remark -- Check to see if more mail came in during processing
  226.     if exist c:\Mail\FlagFile.New Goto Start
  227.  
  228.     Remark -- Kill the "Active" flag and close the window
  229.     del c:\Mail\FlagFile.Bsy
  230.     exit
  231.  
  232.     Similar use of the "Active" flag can be used to be sure that no mail
  233. is being processed when doing message area maintenance and scanning.  With
  234. only a little work, all routine chores can be handled in the background
  235. leaving nodes on line nearly all of the time.  Using these methods, I have
  236. managed to reduce my offline time to less than 4 percent of the day.
  237.  
  238.     Another use for CopyMail is to collect mail into a single bundle for
  239. nodes who poll on an infrequent basis.  Because of the way that CopyMail
  240. names the compressed mail bundles when it moves mail, if you copy mail from
  241. your outbound area into a different directory, and then copy it back to
  242. the outbound area, all of the similarly named compressed bundles will be
  243. concatenated into a single bundle.  For example, *.FR?, *.SA? and *.SU? will
  244. all be combined into *.SU0 (if you do this on Sunday).
  245.  
  246.     I'd like to extend a special "Thank you" to all the folks who have risked
  247. both their mail and reputations to helping me test this program.  Without
  248. their bug reports and fresh ideas, CopyMail would not as good a product as
  249. the one you see.  A special thanks to:
  250.  
  251.         Don Dawson        1:141/730
  252.         Bob Germer        1:266/21
  253.         Lawrence Kolada   1:327/452
  254.         George Peace      1:13/13
  255.         Terry Rossi       1:266/22
  256.         John Souvestre    1:396/1
  257.         Dave West         8:952/12
  258.